package com.ditri.distrident.controller;

import com.ditri.distrident.api.AdminLoginApi;
import com.ditri.distrident.common.dto.request.AdminLoginReq;
import com.ditri.distrident.common.dto.response.AdminLoginResp;
import com.ditri.distrident.commonservice.controller.BaseController;
import com.ditri.distrident.service.impl.AdminLoginServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: edxuanlen
 * @Date: 2020/8/1:22:33
 */

@RestController
public class AdminLoginController extends BaseController implements AdminLoginApi {

    @Autowired
    AdminLoginServiceImpl adminLoginService;

    @Override
    public AdminLoginResp checkPassword(@RequestBody @Validated AdminLoginReq adminLoginReq, BindingResult bindingResult) {
        return adminLoginService.checkPassword(adminLoginReq);
    }
}
